﻿using System;
using System.IO;
using System.Text.RegularExpressions;

namespace SeriesUtil.SeriesClasses
{
    public class Episode
    {
        private String name;
        private String number;
        // should be moved to a static Class...
        //public static String[] extensions = new String[]{".mkv", ".avi"};

        public Episode(String name, String number)
        {
            this.name = name;
            this.number = number;
        }

        public String Name
        {
            get { return name; }
            set { this.name = value; }
        }

        public String Number
        {
            get { return number; }
            set { this.number = value; }
        }

        /* TODO: get out of here...
        private void ExtractNumber(String fileName)
        {
            if (fileName != null)
            {
                Match match = Regex.Match(fileName, @"()([0-9]+)((?:-[0-9]+)*) [^\\/]*$", RegexOptions.IgnoreCase);
                if (match.Success)
                {
                    number = match.Groups[0].Value;
                }
                else
                {
                    number = "Not Found";
                }
            }
            else
                throw new ArgumentNullException("fileName");
        }
         * */
    }
}
